This example describes the simple use of jquery form validation. Share to everyone for your reference, specific as follows:
These days has been doing a form verification page, in order to achieve a friendly interface, deliberately copied the 360buy page, imitation wrote a page
jquery form
This example describes the jquery implementation form validation code. Share to everyone for your reference. Specifically as follows:The screenshot of the running effect is as follows:
The specific code is as follows:
Directly on the plug-in implementation code, around the code to explain the easier point:
/* Description: A
This article describes examples of the Form Verification plug-in Validation application. For more information, see jquery. validation is an excellent jquery plug-in that can verify client forms and provides many customizable attributes and methods for good scalability. Now, based on the actual situation, I organize the
This article describes examples of the form verification plug-in Validation application. For more information, see jquery. validation is an excellent jquery plug-in that can verify client forms and provides many customizable attributes and methods for good scalability. Now, based on the actual situation, I organize the
This example describes the use of jquery form validation plug-ins in the YII framework. Share to everyone for your reference, as follows:
Run as follows:
View Layer:
Controller (verify Uniqueness):
Verify name Uniqueness Public Function actiononly () { $u _name=yii:: $app->request->get (' u_name '); $login =yii:: $app->db; Query
This article describes the jquery time validation and conversion tool Small example, the need for friends can refer to the
copy code code as follows:
var timeobjectutil; /** * @title Time Tool class * @note This class of all violations verify return False * @author {boonyachengdu@gmail.com} * @date 2013-07-01 * @formatter "2013-07-01 00:00:00", "2013-0
jquery implements a validation example for uploading file size types (recommended)
The above is a small series for everyone to achieve the implementation of the jquery upload file size type verification example (recommended) All content, I hope that we support c
Js:$ ("#email"). blur (function () {//Gets the value of the element corresponding to the ID, minus its left and right space var email = $.trim ($ (' #email '). Val ());//Verify the mailbox format of the JS regular expression var Isemail =/^\w+ ([-+.] \w+) *@\w+ ([-.] \w+) *\.\w+ ([-.] \w+) *$/; Empties the data in the display layer by $ ("#emailMess"). HTML (""); if (email = = "") { $ ("#emailMess"). HTML ("HTML:Example of jquery+ Regular expres
Similar to the effect of deletion, before the implementation of the general need to add Confirmation dialog box, click to confirm the execution of the cancellation button will not execute, the traditional JS
if (confirm) (' OK delete? '))
{
//execute code
}
This is an ugly effect, using jquery mobile to optimize
Files to refer to:
The effect is as follows:
function UpdateStatus () {var popupdialogid = ' Popupdialog '; $ ('
Details about jQuery Form Verification plug-ins -- Validation, jquery -- validation
Overview
The jQuery Validate plug-in provides powerful form verification functions to simplify form verification on the client side. It also provides a large number of custom options to meet
When using the jquery Validation engine, we can customize the regular validation ourselves in addition to our own API. Custom regular validation The previous article has been told, what if you want to use a custom function for validation? In fact, this control has a bug, in
When using the jquery Validation engine, We can customize the regular validation ourselves in addition to our own Api. Custom regular validation The previous article has been told, what if you want to use a custom function for validation? In fact, this control has a bug, in
The validation that is involved in this example is:
User name: Length, character verification, repetitive Ajax validation (whether it already exists).
Password: Length verification, repeat input password verification.
Mail: Email address verification.
Fixed Telephone: Fixed telephone number verification in mainland China.
Mobile phone Number: China mainland
JQuery Validate Form validation Plugin-associate fields with the name attribute for verification, change the default prompt information, and write the validation rules to the js Code. Form validation plugin validate
1. Download dependency packages
Network Disk download: https://yunpan.cn/cryvgGGAQ3DSW access password
, but due to the use of the CSS3 Shadow and fillet style, in IE browser can not see the rounded corners and shadow effects (evil IE).
Official Download Address: http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/
Examples of common validation: http://www.position-relative.net/creation/formValidator/
Examples of AJAX
= "Validate ()") with the following form. 1: 2: 3: 4: 5: 7: Unobtrusive JavaScript is a broad topic that is not likely to be introduced systematically in this article. Unobtrusive JavaScript is well represented in the validation of jquery, so let's briefly introduce the programmatic approach to validating with jquery.Ii. specifying validation
incoming values can be strings or one/two-dimensional arraysYou should data_revert () before executing this method, and the contents of the form need not be restoredFunction Data_show ( $data){if (Is_array ($data)){foreach ($data as $k 1 = $v 1){if (Is_array ($v 1)){foreach ($v 1 as $k 2 = $v 2){$data [$k 1][$k 2]=nl2br (Htmlspecialchars ($data [$k 1][$k 2]);$data [$k 1][$k 2]=str_replace ("", "", $data [$k 1][$k 2]);$data [$k 1][$k 2]=str_replace ("\ n", "\ n ", $data [$k 1][$k 2]);}}Else{$dat
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.